package org.lemon.cla.dto.request; // 建议放在 dto 或 request 包中

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
import org.lemon.cla.enums.NewsCategoryEnum;

@Data
@Schema(description = "新闻创建请求对象")
public class NewsCreateRequest {

    @NotNull(message = "新闻标题不能为空")
    @Schema(description = "标题", example = "学校图书馆新增图书", required = true)
    private String title;

    @Schema(description = "封面URL", example = "http://example.com/cover.jpg")
    private String coverUrl;

    @NotNull(message = "新闻内容不能为空")
    @Schema(description = "新闻内容", example = "详细新闻内容...", required = true)
    private String content;

    @NotNull(message = "发布者ID不能为空")
    @Schema(description = "发布者ID (管理员)", example = "101", required = true)
    private Long publisherId;

    @NotNull(message = "新闻类别不能为空")
    @Schema(description = "新闻类别", example = "学术", allowableValues = {"学术", "事件", "通知"}, required = true)
    private NewsCategoryEnum category;
}